package com.hyh.fireworks.web;

import com.hyh.fireworks.common.result.AjaxResult;
import com.hyh.fireworks.service.IHomeService;
import com.hyh.fireworks.vo.HomeVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;


/**
 * @author Summerday
 */
@Api(tags = "主页信息展示接口")
@RestController
public class HomeController extends BaseController {

    @Resource
    IHomeService homeService;

    @GetMapping("/")
    @ApiOperation("获取首页数据")
    public AjaxResult index() {
        HomeVo homeVo = homeService.content();
        return AjaxResult.ok(homeVo);
    }
}
